<?php
const REDIS_SERVER_HOST = '192.168.1.40';
const REDIS_SERVER_PORT = 6379;

Co::create(function() {
    $redis = new Swoole\Coroutine\Redis();
    $redis->connect(REDIS_SERVER_HOST, REDIS_SERVER_PORT);
    $redis->setDefer();
    $redis->set('swoole:t1', 'hello');
    $redis->get('swoole:t1');

    $result1 = $redis->recv();
    $result2 = $redis->recv();

    var_dump($result1, $result2);
});
